﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TaleWorlds.CampaignSystem;
using TaleWorlds.CampaignSystem.GameComponents;
using TaleWorlds.CampaignSystem.Party;
using TaleWorlds.Localization;

//自定义专精点数规则
namespace ExampleMod
{
    public class CustomCharacterDevelopmentModel : DefaultCharacterDevelopmentModel
    {
        //TO-Do
        //不知道这里是所有英雄生效吗,如果是的话应该改成玩家生效
        //每一级给的专精点数
        public override int FocusPointsPerLevel
        {
            get
            {
                return 10;
            }
        }
        //每个属性点需要的等级
        public override int LevelsPerAttributePoint
        {
            get { return 1; }
        }



    }

    //自定义部队移动速度
    public class CustomPartySpeedCalculatingModel : DefaultPartySpeedCalculatingModel
    {
        public override ExplainedNumber CalculateFinalSpeed(MobileParty mobileParty, ExplainedNumber finalSpeed)
        {
            //获取默认移动速度最终值
            ExplainedNumber defaultfinalSpeed = base.CalculateFinalSpeed(mobileParty, finalSpeed);
            //如果是玩家,就默认值+10,否则按默认值返回
            if (mobileParty.IsMainParty)
            {
                TextObject textObject = new("美团外卖,送啥都快", null);
                defaultfinalSpeed.AddFactor(1f, textObject);
                return defaultfinalSpeed;
            }
            else
            {
                return defaultfinalSpeed;
            }
            
        }
    }
}
